home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / texts / hsc.lha / hsc / src_docs / macro / flag.hsc < prev    next >
Text File  |  1996-04-20  |  3KB  |  76 lines

  1. <WEBPAGE chapter="hsc - Features - Macros - "
  2.          title="Flags for tags and macros">
  3.  
  4. <$macro LIFLAG SHORT:string/r LONG:string/r ONLYDEFTAG:bool>
  5. <DT><CODE>/<$insert text=(long)></CODE>
  6.     (short: <CODE>/<$insert text=(short)></CODE>)
  7. <DD>
  8. </$macro>
  9.  
  10. Within  <ln_macro> and <ln_deftag>,
  11. you can use several flag to tell <hsc> how to handle this macro/tag.
  12.  
  13.  
  14. Legal flags for <ln_macro> are:
  15. <DL>
  16. <LIFLAG long="ONLYONCE" short="1">
  17.     macro/tag is required at the most once within a document
  18. <LIFLAG long="REQUIRED" short="R">
  19.     macro/tag is required at least once within a document
  20. <LIFLAG long="MUST_BE_INSIDE" short="MBI">
  21.     Needs a string as argument, that contains a list of container tags,
  22.     that must be started before tag is allowed to be used.<BR>
  23.     Example:<BR>
  24.     The tag <TG>LI</TG> must be used inside some sort of lists only,
  25.     therefor it's <CODE>/MBI="ul|ol|dir|menu"</CODE> is used.
  26.     The '|' is used as a separator for multiple tags.
  27.  
  28. <LIFLAG long="NOT_ALLOWED_WITHIN" short="NAW">
  29.     Like <CODE>/MBI</CODE>, but this time tags that must not be
  30.     used before. For example, a nested usage of <TG>A</TG>
  31.     is not allowed, therefor <CODE>/NAW="a"</CODE> is used.
  32. </DL>
  33.  
  34. Additionally, the following flags can be used with <ln_deftag>
  35. <DL>
  36. <LIFLAG long="CLOSE" short="C">
  37.     tag is a container and requires a corresponding closing tag.
  38. <LIFLAG long="AUTOCLOSE" short="AC">
  39.     Used for <TG>P</TG> and <TG>LI</TG>, which can be used as container
  40.     or single tag depending on the HTML version.
  41. <LIFLAG long="JERK" short="J" ONLYDEFTAG>
  42.     tag is only used by jerks
  43. <LIFLAG long="LAZY" short="L" ONLYDEFTAG>
  44.     This flag has just been for my lazyness and defines some
  45.     often needed attributes with a single letter;
  46.     `<CODE>c</CODE>' for `<CODE>CLASS:string</CODE>',
  47.     `<CODE>h</CODE>' for `<CODE>HREF:uri</CODE>',
  48.     `<CODE>i</CODE>' for `<CODE>ID:id</CODE>',
  49.     `<CODE>k</CODE>' for `<CODE>CLEAR:bool</CODE>',
  50.     `<CODE>l</CODE>' for `<CODE>LANG:string</CODE>',
  51.     `<CODE>m</CODE>' for `<CODE>MD:string</CODE>',
  52.     `<CODE>s</CODE>' for `<CODE>SRC:uri</CODE>',
  53.     `<CODE>w</CODE>' for `<CODE>NOWRAP:bool</CODE>'.
  54.     For example, use <CODE>/LAZY="cil"</CODE>.
  55.  
  56. <LIFLAG long="OBSOLETE" short="O">
  57.     tag is obsolete and should not be used any more. This eg.
  58.     concerns <TG>LISTING</TG>.
  59. <LIFLAG long="SKIPLF" short="S">
  60.     skip a linefeed ("\n") that comes immediatly after the tag. This
  61.     is only useful for some of <hsc>'s special tags and only avoids
  62.     some uneccessary empty lines.
  63. <LIFLAG long="SPECIAL" short="SPC">
  64.     This one marks tags which are no "normal" tags with some attributes,
  65.     but have their own syntax. The only HTML-tag which has this flag
  66.     set is <TG>!</TG> (for SGML comments).
  67. </DL>
  68.  
  69. <P>To define a closing macro, don't use <CODE>/CLOSE</CODE>, but define
  70. the macro a second time, with a "<KBD>/</KBD>" as the first character
  71. of its name. For examples, see the section about <ln_macro>.</P>
  72.  
  73. </WEBPAGE>
  74.  
  75.  
  76.